from django.urls import path
from .views import login, setup, iot, api
urlpatterns = [
    path('', login.index, name='index'),  # 首页
    path('index/<int:aid>', login.index, name='index'),  # 首页
    path('login/', login.login, name='login'),  # 登录
    path('logout/', login.logout, name='logout'),  # 退出登录
    path('forgot/', login.forgot, name='forgot'),   # 忘记密码
    path('forgot/reset/', login.forgot_reset, name='forgot_reset'),   # 忘记密码
    path('forgot/resetPWD/', login.forgot_resetPWD, name='forgot_resetPWD'),   # 忘记密码
    path('register/', login.register, name='register'),  # 注册
    path('send/sms/', login.send_sms, name='send_sms'),  # 短信验证码
    path('image/code/', login.image_code, name='image_code'),  # 图片验证码
    path('login/sms/', login.login_sms, name='login_sms'),
    path('reward/', login.reward, name='reward'),  # 打赏
    # path('button/', login.button, name='button'),  # 按钮,不用了，以后删掉
    path('setup/', setup.setup, name='setup'),  # 设置
    path('setup/<int:mid>/<str:setup>/', setup.setup, name='setup'),  # 保存更新
    path('setup/delete/', setup.setupDelete, name='setupDelete'),  # 删除
    path('setup/mySelectPlat/', setup.mySelectPlat, name='mySelectPlat'),  # 选择平台
    path('iot/connect/', iot.connect, name='iotConnect'),  # 进入与平台连接状态
    # path('api/device-data/', api.device_data, name='deviceData'),  # 获取设备数据,已有webSocket代替了



]
